#include <stdio.h>
void copy_arr(double target[], double source[], int n);
void show_arr(double arr[], int n);
int main(void)
{
    double nums [7] = {1, 2, 3, 4, 5, 6, 7};
    double target [3];

    show_arr(target, 3);
    copy_arr(target, nums + 2, 3);
    show_arr(target, 3);

    return 0;
}

void copy_arr(double target[], double source[], int n)
{   
    int i;

    for (i = 0; i < n; i++)
        target[i] = source[i];

    return;
}

void show_arr(double arr[], int n)
{
    int i;

    for (i = 0; i < n; i++)
        printf("arr[%d]=%.1lf ", i, arr[i]);
    
    putchar('\n');
}